<template>
	<view class="bg-white margin-top">
		<swiper class="card-swiper square-dot" :indicator-dots="true" :circular="true" :autoplay="true" :interval="interval"
		 duration="500" @change="cardSwiper" indicator-color="#8799a3" indicator-active-color="#0081ff">
			<swiper-item v-for="(item,index) in swiperList" :key="index">
				<view class="swiper-item" @tap="toPage">
					<image :src="item.url" mode="aspectFill"></image>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		name: 'carousel',
		computed: {

		},
		props: {
			swiperList: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				interval: '5000'
			};
		},
		created() {

		},
		methods: {
			cardSwiper(e) {
				this.cardCur = e.detail.current
			},
			toPage() {
				uni.navigateTo({
					url: ""
				})
			}
		}
	}
</script>

<style>

</style>
